Skip to content

commitlog: Fix index truncation test.#2792

Merged
kim merged 1 commit into
masterfrom
kim/commitlog/fix-index-truncation-test
May 30, 2025
Merged

commitlog: Fix index truncation test.#2792
kim merged 1 commit into
masterfrom
kim/commitlog/fix-index-truncation-test

Conversation

@kim
Copy link
Copy Markdown
Contributor

@kim kim commented May 26, 2025

Since #2771, and error is returned instead of the zero key if an offset
index lookup yields the zero key.

truncate removes the entry at its argument's key, i.e. truncate(1)
empties the index.

Adjust the offset_index_writer_truncates_to_offset test to handle this
edge case. Also de-randomize it so all keys are tested.

Expected complexity level and risk

1

Testing

  • It is changing a test

Since #2771, and error is returned instead of the zero key if an offset
index lookup yields the zero key.

`truncate` removes the entry at its argument's key, i.e. `truncate(1)`
empties the index.

Adjust the `offset_index_writer_truncates_to_offset` test to handle this
edge case. Also de-randomize it so all keys are tested.
@kim kim requested a review from Shubham8287 May 26, 2025 08:27
@bfops bfops added the release-any To be landed in any release window label May 27, 2025
@kim kim added this pull request to the merge queue May 30, 2025
Merged via the queue into master with commit c982195 May 30, 2025
22 checks passed
@kim kim deleted the kim/commitlog/fix-index-truncation-test branch May 7, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants